package com.administration.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.core.entity.BaseEntity;

@Entity
@Table(name = "privilege")
public class Privilege extends BaseEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "recid", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long recid;

	@Column(name = "name", length = 100)
	private String name;

	@Column(name = "category_id")
	private Long categoryId;

//	@ManyToMany(cascade = CascadeType.ALL)
//	@JoinTable(name = "group_privileges", joinColumns = { @JoinColumn(name = "privilage_id") }, inverseJoinColumns = { @JoinColumn(name = "group_id") })
//	private List<Group> groups;

	public Privilege() {
	}

	@Override
	public String toString() {
		return "Privialges [recid=" + recid + ", name=" + name + ", categoryId"
				+ categoryId + "]";
	}

	public void setRecid(Long recid) {
		this.recid = recid;
	}

	public Long getRecid() {
		return recid;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public Long getCategoryId() {
		return categoryId;
	}

//	public void setGroups(List<Group> groups) {
//		this.groups = groups;
//	}
//
//	public List<Group> getGroups() {
//		return groups;
//	}

}
